<!-- user_info.html -->

{% extends "base.html" %}
{% block title %}
首页
{% endblock %}
{% block main %}
   <div class="col-10 offset-1">
        <div class="card card-primary">
            <div class="card-header">
                <h3 class="card-title">基本信息</h3>
            </div>
            <form method="post" id="userForm" class="form-horizontal">
                {% csrf_token %}
                <div class="card-body">
                    <div class="form-group">
                        <label>用户名</label>
                        <input value="{{ user.username }}" disabled type="text" name="username" class="form-control" placeholder="用户名">
                    </div>
                    <div class="form-group">
                        <label>真实姓名</label>
                        <input value="{{ form.real_name.value }}" type="text" name="real_name" class="form-control" placeholder="真实姓名">
                    </div>
                    <div class="form-group ">
                        <label>联系电话</label>
                        <input name="phone" value="{{ form.phone.value }}" type="text" class="form-control" placeholder="联系电话">
                    </div>
                    <div class="form-group ">
                        <label>联系邮箱</label>
                        <input name="email" value="{{ form.email.value }}" type="email" class="form-control" placeholder="联系邮箱">
                    </div>
                    <div class="form-group ">
                        <label>性别</label>
                        <select name="sex" class="form-control">
                            <option value="男" {% if form.sex.value == '男' %} selected {% endif %}>男</option>
                            <option value="女" {% if form.sex.value == '女' %} selected {% endif %}>女</option>
                        </select>
                    </div>
                </div>
                <!-- /.card-body -->
                <div class="card-footer">
                    <div class="row">
                        <div class="col-8 offset-2">
                            <button type="submit" class="btn btn-primary btn-block">立即修改</button>
                        </div>
                    </div>
                </div>
                <!-- /.card-footer -->
            </form>
        </div>
   </div>

{% endblock %}
{% block script %}
  <script src="/static/dist/js/user-info.js"></script>
{% endblock %}
